/*
#include <stdio.h>
#include<string.h>
int main( )
{
	char s[] = "\\123456\123456\t";
	printf("%d\n",strlen(s));
	return 0;
}
*/
/*
#include<stdio.h>
#define N 2
#define M N+1
#define NUM (M+1)*M/2
int main( )
{
	printf("%d\n",NUM);
	return 0;
}
*/
/*
#include<stdio.h>
int f(int n)
{
	static int i = 1;
	if(n>=5)
	{
		return n;
	}
	n = n+i;
	i++;
	return f(n);
}
int main( )
{
	int n;
	scanf("%d",&n);
	int ret = f(n);
	printf("%d",ret);
	return 0;
}
*/
#include<stdio.h>
int main( )
{
	int i = 2;
	int n = 0;
	int sum = 0;
	scanf("%d",&n);
	while(n)
	{
		sum += i;
		i += 3;
		n--;
	}
	printf("%d",sum);
	return 0;
}




